<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>DiagonalMatrix (Apache Commons Math 3.6.1 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="DiagonalMatrix (Apache Commons Math 3.6.1 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DiagonalMatrix.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/math3/linear/DefaultRealMatrixPreservingVisitor.html" title="class in org.apache.commons.math3.linear"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/math3/linear/EigenDecomposition.html" title="class in org.apache.commons.math3.linear"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/math3/linear/DiagonalMatrix.html" target="_top">Frames</a></li>
<li><a href="DiagonalMatrix.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.math3.linear</div>
<h2 title="Class DiagonalMatrix" class="title">Class DiagonalMatrix</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/commons/math3/linear/RealLinearOperator.html" title="class in org.apache.commons.math3.linear">org.apache.commons.math3.linear.RealLinearOperator</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html" title="class in org.apache.commons.math3.linear">org.apache.commons.math3.linear.AbstractRealMatrix</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.math3.linear.DiagonalMatrix</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a>, <a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">DiagonalMatrix</span>
extends <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html" title="class in org.apache.commons.math3.linear">AbstractRealMatrix</a>
implements <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre>
<div class="block">Implementation of a diagonal matrix.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>3.1.1</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#org.apache.commons.math3.linear.DiagonalMatrix">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#DiagonalMatrix(double[])">DiagonalMatrix</a></strong>(double[]&nbsp;d)</code>
<div class="block">Creates a matrix using the input array as the underlying data.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#DiagonalMatrix(double[],%20boolean)">DiagonalMatrix</a></strong>(double[]&nbsp;d,
              boolean&nbsp;copyArray)</code>
<div class="block">Creates a matrix using the input array as the underlying data.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#DiagonalMatrix(int)">DiagonalMatrix</a></strong>(int&nbsp;dimension)</code>
<div class="block">Creates a matrix with the supplied dimension.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html" title="class in org.apache.commons.math3.linear">DiagonalMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#add(org.apache.commons.math3.linear.DiagonalMatrix)">add</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html" title="class in org.apache.commons.math3.linear">DiagonalMatrix</a>&nbsp;m)</code>
<div class="block">Compute the sum of <code>this</code> and <code>m</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#addToEntry(int,%20int,%20double)">addToEntry</a></strong>(int&nbsp;row,
          int&nbsp;column,
          double&nbsp;increment)</code>
<div class="block">Adds (in place) the specified value to the specified entry of
 <code>this</code> matrix.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#copy()">copy</a></strong>()</code>
<div class="block">Returns a (deep) copy of this.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#createMatrix(int,%20int)">createMatrix</a></strong>(int&nbsp;rowDimension,
            int&nbsp;columnDimension)</code>
<div class="block">Create a new RealMatrix of the same type as the instance with the
 supplied
 row and column dimensions.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#getColumnDimension()">getColumnDimension</a></strong>()</code>
<div class="block">Returns the number of columns of this matrix.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double[][]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#getData()">getData</a></strong>()</code>
<div class="block">Returns matrix entries as a two-dimensional array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#getDataRef()">getDataRef</a></strong>()</code>
<div class="block">Gets a reference to the underlying data array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#getEntry(int,%20int)">getEntry</a></strong>(int&nbsp;row,
        int&nbsp;column)</code>
<div class="block">Get the entry in the specified row and column.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#getRowDimension()">getRowDimension</a></strong>()</code>
<div class="block">Returns the number of rows of this matrix.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html" title="class in org.apache.commons.math3.linear">DiagonalMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#inverse()">inverse</a></strong>()</code>
<div class="block">Computes the inverse of this diagonal matrix.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html" title="class in org.apache.commons.math3.linear">DiagonalMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#inverse(double)">inverse</a></strong>(double&nbsp;threshold)</code>
<div class="block">Computes the inverse of this diagonal matrix.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#isSingular(double)">isSingular</a></strong>(double&nbsp;threshold)</code>
<div class="block">Returns whether this diagonal matrix is singular, i.e.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html" title="class in org.apache.commons.math3.linear">DiagonalMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#multiply(org.apache.commons.math3.linear.DiagonalMatrix)">multiply</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html" title="class in org.apache.commons.math3.linear">DiagonalMatrix</a>&nbsp;m)</code>
<div class="block">Returns the result of postmultiplying <code>this</code> by <code>m</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#multiply(org.apache.commons.math3.linear.RealMatrix)">multiply</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a>&nbsp;m)</code>
<div class="block">Returns the result of postmultiplying <code>this</code> by <code>m</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#multiplyEntry(int,%20int,%20double)">multiplyEntry</a></strong>(int&nbsp;row,
             int&nbsp;column,
             double&nbsp;factor)</code>
<div class="block">Multiplies (in place) the specified entry of <code>this</code> matrix by the
 specified value.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#operate(double[])">operate</a></strong>(double[]&nbsp;v)</code>
<div class="block">Returns the result of multiplying this by the vector <code>v</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#preMultiply(double[])">preMultiply</a></strong>(double[]&nbsp;v)</code>
<div class="block">Returns the (row) vector result of premultiplying this by the vector <code>v</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#preMultiply(org.apache.commons.math3.linear.RealVector)">preMultiply</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a>&nbsp;v)</code>
<div class="block">Returns the (row) vector result of premultiplying this by the vector <code>v</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#setEntry(int,%20int,%20double)">setEntry</a></strong>(int&nbsp;row,
        int&nbsp;column,
        double&nbsp;value)</code>
<div class="block">Set the entry in the specified row and column.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html" title="class in org.apache.commons.math3.linear">DiagonalMatrix</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#subtract(org.apache.commons.math3.linear.DiagonalMatrix)">subtract</a></strong>(<a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html" title="class in org.apache.commons.math3.linear">DiagonalMatrix</a>&nbsp;m)</code>
<div class="block">Returns <code>this</code> minus <code>m</code>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.math3.linear.AbstractRealMatrix">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.commons.math3.linear.<a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html" title="class in org.apache.commons.math3.linear">AbstractRealMatrix</a></h3>
<code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#add(org.apache.commons.math3.linear.RealMatrix)">add</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#copySubMatrix(int[],%20int[],%20double[][])">copySubMatrix</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#copySubMatrix(int,%20int,%20int,%20int,%20double[][])">copySubMatrix</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#equals(java.lang.Object)">equals</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#getColumn(int)">getColumn</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#getColumnMatrix(int)">getColumnMatrix</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#getColumnVector(int)">getColumnVector</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#getFrobeniusNorm()">getFrobeniusNorm</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#getNorm()">getNorm</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#getRow(int)">getRow</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#getRowMatrix(int)">getRowMatrix</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#getRowVector(int)">getRowVector</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#getSubMatrix(int[],%20int[])">getSubMatrix</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#getSubMatrix(int,%20int,%20int,%20int)">getSubMatrix</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#getTrace()">getTrace</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#hashCode()">hashCode</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#isSquare()">isSquare</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#operate(org.apache.commons.math3.linear.RealVector)">operate</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#power(int)">power</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#preMultiply(org.apache.commons.math3.linear.RealMatrix)">preMultiply</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#scalarAdd(double)">scalarAdd</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#scalarMultiply(double)">scalarMultiply</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#setColumn(int,%20double[])">setColumn</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#setColumnMatrix(int,%20org.apache.commons.math3.linear.RealMatrix)">setColumnMatrix</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#setColumnVector(int,%20org.apache.commons.math3.linear.RealVector)">setColumnVector</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#setRow(int,%20double[])">setRow</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#setRowMatrix(int,%20org.apache.commons.math3.linear.RealMatrix)">setRowMatrix</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#setRowVector(int,%20org.apache.commons.math3.linear.RealVector)">setRowVector</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#setSubMatrix(double[][],%20int,%20int)">setSubMatrix</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#subtract(org.apache.commons.math3.linear.RealMatrix)">subtract</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#toString()">toString</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#transpose()">transpose</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#walkInColumnOrder(org.apache.commons.math3.linear.RealMatrixChangingVisitor)">walkInColumnOrder</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#walkInColumnOrder(org.apache.commons.math3.linear.RealMatrixChangingVisitor,%20int,%20int,%20int,%20int)">walkInColumnOrder</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#walkInColumnOrder(org.apache.commons.math3.linear.RealMatrixPreservingVisitor)">walkInColumnOrder</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#walkInColumnOrder(org.apache.commons.math3.linear.RealMatrixPreservingVisitor,%20int,%20int,%20int,%20int)">walkInColumnOrder</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#walkInOptimizedOrder(org.apache.commons.math3.linear.RealMatrixChangingVisitor)">walkInOptimizedOrder</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#walkInOptimizedOrder(org.apache.commons.math3.linear.RealMatrixChangingVisitor,%20int,%20int,%20int,%20int)">walkInOptimizedOrder</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#walkInOptimizedOrder(org.apache.commons.math3.linear.RealMatrixPreservingVisitor)">walkInOptimizedOrder</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#walkInOptimizedOrder(org.apache.commons.math3.linear.RealMatrixPreservingVisitor,%20int,%20int,%20int,%20int)">walkInOptimizedOrder</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#walkInRowOrder(org.apache.commons.math3.linear.RealMatrixChangingVisitor)">walkInRowOrder</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#walkInRowOrder(org.apache.commons.math3.linear.RealMatrixChangingVisitor,%20int,%20int,%20int,%20int)">walkInRowOrder</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#walkInRowOrder(org.apache.commons.math3.linear.RealMatrixPreservingVisitor)">walkInRowOrder</a>, <a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#walkInRowOrder(org.apache.commons.math3.linear.RealMatrixPreservingVisitor,%20int,%20int,%20int,%20int)">walkInRowOrder</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.math3.linear.RealLinearOperator">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.commons.math3.linear.<a href="../../../../../org/apache/commons/math3/linear/RealLinearOperator.html" title="class in org.apache.commons.math3.linear">RealLinearOperator</a></h3>
<code><a href="../../../../../org/apache/commons/math3/linear/RealLinearOperator.html#isTransposable()">isTransposable</a>, <a href="../../../../../org/apache/commons/math3/linear/RealLinearOperator.html#operateTranspose(org.apache.commons.math3.linear.RealVector)">operateTranspose</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="DiagonalMatrix(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DiagonalMatrix</h4>
<pre>public&nbsp;DiagonalMatrix(int&nbsp;dimension)
               throws <a href="../../../../../org/apache/commons/math3/exception/NotStrictlyPositiveException.html" title="class in org.apache.commons.math3.exception">NotStrictlyPositiveException</a></pre>
<div class="block">Creates a matrix with the supplied dimension.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dimension</code> - Number of rows and columns in the new matrix.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/NotStrictlyPositiveException.html" title="class in org.apache.commons.math3.exception">NotStrictlyPositiveException</a></code> - if the dimension is
 not positive.</dd></dl>
</li>
</ul>
<a name="DiagonalMatrix(double[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DiagonalMatrix</h4>
<pre>public&nbsp;DiagonalMatrix(double[]&nbsp;d)</pre>
<div class="block">Creates a matrix using the input array as the underlying data.
 <br/>
 The input array is copied, not referenced.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>d</code> - Data for the new matrix.</dd></dl>
</li>
</ul>
<a name="DiagonalMatrix(double[], boolean)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DiagonalMatrix</h4>
<pre>public&nbsp;DiagonalMatrix(double[]&nbsp;d,
              boolean&nbsp;copyArray)
               throws <a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></pre>
<div class="block">Creates a matrix using the input array as the underlying data.
 <br/>
 If an array is created specially in order to be embedded in a
 this instance and not used directly, the <code>copyArray</code> may be
 set to <code>false</code>.
 This will prevent the copying and improve performance as no new
 array will be built and no data will be copied.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>d</code> - Data for new matrix.</dd><dd><code>copyArray</code> - if <code>true</code>, the input array will be copied,
 otherwise it will be referenced.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if d is null</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="createMatrix(int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createMatrix</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a>&nbsp;createMatrix(int&nbsp;rowDimension,
                      int&nbsp;columnDimension)
                        throws <a href="../../../../../org/apache/commons/math3/exception/NotStrictlyPositiveException.html" title="class in org.apache.commons.math3.exception">NotStrictlyPositiveException</a>,
                               <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre>
<div class="block">Create a new RealMatrix of the same type as the instance with the
 supplied
 row and column dimensions.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html#createMatrix(int,%20int)">createMatrix</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#createMatrix(int,%20int)">createMatrix</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html" title="class in org.apache.commons.math3.linear">AbstractRealMatrix</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>rowDimension</code> - the number of rows in the new matrix</dd><dd><code>columnDimension</code> - the number of columns in the new matrix</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new matrix of the same type as the instance</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if the requested dimensions are not equal.</dd>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/NotStrictlyPositiveException.html" title="class in org.apache.commons.math3.exception">NotStrictlyPositiveException</a></code> - if row or column dimension is not
 positive.</dd></dl>
</li>
</ul>
<a name="copy()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a>&nbsp;copy()</pre>
<div class="block">Returns a (deep) copy of this.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html#copy()">copy</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#copy()">copy</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html" title="class in org.apache.commons.math3.linear">AbstractRealMatrix</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>matrix copy</dd></dl>
</li>
</ul>
<a name="add(org.apache.commons.math3.linear.DiagonalMatrix)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html" title="class in org.apache.commons.math3.linear">DiagonalMatrix</a>&nbsp;add(<a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html" title="class in org.apache.commons.math3.linear">DiagonalMatrix</a>&nbsp;m)
                   throws <a href="../../../../../org/apache/commons/math3/linear/MatrixDimensionMismatchException.html" title="class in org.apache.commons.math3.linear">MatrixDimensionMismatchException</a></pre>
<div class="block">Compute the sum of <code>this</code> and <code>m</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>m</code> - Matrix to be added.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>this + m</code>.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/MatrixDimensionMismatchException.html" title="class in org.apache.commons.math3.linear">MatrixDimensionMismatchException</a></code> - if <code>m</code> is not the same
 size as <code>this</code>.</dd></dl>
</li>
</ul>
<a name="subtract(org.apache.commons.math3.linear.DiagonalMatrix)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>subtract</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html" title="class in org.apache.commons.math3.linear">DiagonalMatrix</a>&nbsp;subtract(<a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html" title="class in org.apache.commons.math3.linear">DiagonalMatrix</a>&nbsp;m)
                        throws <a href="../../../../../org/apache/commons/math3/linear/MatrixDimensionMismatchException.html" title="class in org.apache.commons.math3.linear">MatrixDimensionMismatchException</a></pre>
<div class="block">Returns <code>this</code> minus <code>m</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>m</code> - Matrix to be subtracted.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>this - m</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/MatrixDimensionMismatchException.html" title="class in org.apache.commons.math3.linear">MatrixDimensionMismatchException</a></code> - if <code>m</code> is not the same
 size as <code>this</code>.</dd></dl>
</li>
</ul>
<a name="multiply(org.apache.commons.math3.linear.DiagonalMatrix)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>multiply</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html" title="class in org.apache.commons.math3.linear">DiagonalMatrix</a>&nbsp;multiply(<a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html" title="class in org.apache.commons.math3.linear">DiagonalMatrix</a>&nbsp;m)
                        throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre>
<div class="block">Returns the result of postmultiplying <code>this</code> by <code>m</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>m</code> - matrix to postmultiply by</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>this * m</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if
 <code>columnDimension(this) != rowDimension(m)</code></dd></dl>
</li>
</ul>
<a name="multiply(org.apache.commons.math3.linear.RealMatrix)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>multiply</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a>&nbsp;multiply(<a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a>&nbsp;m)
                    throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre>
<div class="block">Returns the result of postmultiplying <code>this</code> by <code>m</code>.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html#multiply(org.apache.commons.math3.linear.RealMatrix)">multiply</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#multiply(org.apache.commons.math3.linear.RealMatrix)">multiply</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html" title="class in org.apache.commons.math3.linear">AbstractRealMatrix</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>m</code> - matrix to postmultiply by</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>this * m</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if
 <code>columnDimension(this) != rowDimension(m)</code></dd></dl>
</li>
</ul>
<a name="getData()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getData</h4>
<pre>public&nbsp;double[][]&nbsp;getData()</pre>
<div class="block">Returns matrix entries as a two-dimensional array.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html#getData()">getData</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#getData()">getData</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html" title="class in org.apache.commons.math3.linear">AbstractRealMatrix</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>2-dimensional array of entries</dd></dl>
</li>
</ul>
<a name="getDataRef()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDataRef</h4>
<pre>public&nbsp;double[]&nbsp;getDataRef()</pre>
<div class="block">Gets a reference to the underlying data array.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>1-dimensional array of entries.</dd></dl>
</li>
</ul>
<a name="getEntry(int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEntry</h4>
<pre>public&nbsp;double&nbsp;getEntry(int&nbsp;row,
              int&nbsp;column)
                throws <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre>
<div class="block">Get the entry in the specified row and column. Row and column indices
 start at 0.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html#getEntry(int,%20int)">getEntry</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#getEntry(int,%20int)">getEntry</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html" title="class in org.apache.commons.math3.linear">AbstractRealMatrix</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>row</code> - Row index of entry to be fetched.</dd><dd><code>column</code> - Column index of entry to be fetched.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the matrix entry at <code>(row, column)</code>.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if the row or column index is not valid.</dd></dl>
</li>
</ul>
<a name="setEntry(int, int, double)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEntry</h4>
<pre>public&nbsp;void&nbsp;setEntry(int&nbsp;row,
            int&nbsp;column,
            double&nbsp;value)
              throws <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a>,
                     <a href="../../../../../org/apache/commons/math3/exception/NumberIsTooLargeException.html" title="class in org.apache.commons.math3.exception">NumberIsTooLargeException</a></pre>
<div class="block">Set the entry in the specified row and column. Row and column indices
 start at 0.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html#setEntry(int,%20int,%20double)">setEntry</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#setEntry(int,%20int,%20double)">setEntry</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html" title="class in org.apache.commons.math3.linear">AbstractRealMatrix</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>row</code> - Row index of entry to be set.</dd><dd><code>column</code> - Column index of entry to be set.</dd><dd><code>value</code> - the new value of the entry.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/NumberIsTooLargeException.html" title="class in org.apache.commons.math3.exception">NumberIsTooLargeException</a></code> - if <code>row != column</code> and value is non-zero.</dd>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if the row or column index is not valid</dd></dl>
</li>
</ul>
<a name="addToEntry(int, int, double)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addToEntry</h4>
<pre>public&nbsp;void&nbsp;addToEntry(int&nbsp;row,
              int&nbsp;column,
              double&nbsp;increment)
                throws <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a>,
                       <a href="../../../../../org/apache/commons/math3/exception/NumberIsTooLargeException.html" title="class in org.apache.commons.math3.exception">NumberIsTooLargeException</a></pre>
<div class="block">Adds (in place) the specified value to the specified entry of
 <code>this</code> matrix. Row and column indices start at 0.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html#addToEntry(int,%20int,%20double)">addToEntry</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#addToEntry(int,%20int,%20double)">addToEntry</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html" title="class in org.apache.commons.math3.linear">AbstractRealMatrix</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>row</code> - Row index of the entry to be modified.</dd><dd><code>column</code> - Column index of the entry to be modified.</dd><dd><code>increment</code> - value to add to the matrix entry.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/NumberIsTooLargeException.html" title="class in org.apache.commons.math3.exception">NumberIsTooLargeException</a></code> - if <code>row != column</code> and increment is non-zero.</dd>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if the row or column index is not valid.</dd></dl>
</li>
</ul>
<a name="multiplyEntry(int, int, double)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>multiplyEntry</h4>
<pre>public&nbsp;void&nbsp;multiplyEntry(int&nbsp;row,
                 int&nbsp;column,
                 double&nbsp;factor)
                   throws <a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></pre>
<div class="block">Multiplies (in place) the specified entry of <code>this</code> matrix by the
 specified value. Row and column indices start at 0.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html#multiplyEntry(int,%20int,%20double)">multiplyEntry</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#multiplyEntry(int,%20int,%20double)">multiplyEntry</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html" title="class in org.apache.commons.math3.linear">AbstractRealMatrix</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>row</code> - Row index of the entry to be modified.</dd><dd><code>column</code> - Column index of the entry to be modified.</dd><dd><code>factor</code> - Multiplication factor for the matrix entry.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/OutOfRangeException.html" title="class in org.apache.commons.math3.exception">OutOfRangeException</a></code> - if the row or column index is not valid.</dd></dl>
</li>
</ul>
<a name="getRowDimension()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRowDimension</h4>
<pre>public&nbsp;int&nbsp;getRowDimension()</pre>
<div class="block">Returns the number of rows of this matrix.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html#getRowDimension()">getRowDimension</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a></code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#getRowDimension()">getRowDimension</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html" title="class in org.apache.commons.math3.linear">AbstractRealMatrix</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of rows.</dd></dl>
</li>
</ul>
<a name="getColumnDimension()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getColumnDimension</h4>
<pre>public&nbsp;int&nbsp;getColumnDimension()</pre>
<div class="block">Returns the number of columns of this matrix.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html#getColumnDimension()">getColumnDimension</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/AnyMatrix.html" title="interface in org.apache.commons.math3.linear">AnyMatrix</a></code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#getColumnDimension()">getColumnDimension</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html" title="class in org.apache.commons.math3.linear">AbstractRealMatrix</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of columns.</dd></dl>
</li>
</ul>
<a name="operate(double[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>operate</h4>
<pre>public&nbsp;double[]&nbsp;operate(double[]&nbsp;v)
                 throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre>
<div class="block">Returns the result of multiplying this by the vector <code>v</code>.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html#operate(double[])">operate</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#operate(double[])">operate</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html" title="class in org.apache.commons.math3.linear">AbstractRealMatrix</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - the vector to operate on</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>this * v</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if the length of <code>v</code> does not
 match the column dimension of <code>this</code>.</dd></dl>
</li>
</ul>
<a name="preMultiply(double[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>preMultiply</h4>
<pre>public&nbsp;double[]&nbsp;preMultiply(double[]&nbsp;v)
                     throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre>
<div class="block">Returns the (row) vector result of premultiplying this by the vector <code>v</code>.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html#preMultiply(double[])">preMultiply</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#preMultiply(double[])">preMultiply</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html" title="class in org.apache.commons.math3.linear">AbstractRealMatrix</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - the row vector to premultiply by</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>v * this</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if the length of <code>v</code> does not
 match the row dimension of <code>this</code>.</dd></dl>
</li>
</ul>
<a name="preMultiply(org.apache.commons.math3.linear.RealVector)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>preMultiply</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a>&nbsp;preMultiply(<a href="../../../../../org/apache/commons/math3/linear/RealVector.html" title="class in org.apache.commons.math3.linear">RealVector</a>&nbsp;v)
                       throws <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></pre>
<div class="block">Returns the (row) vector result of premultiplying this by the vector <code>v</code>.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html#preMultiply(org.apache.commons.math3.linear.RealVector)">preMultiply</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</a></code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html#preMultiply(org.apache.commons.math3.linear.RealVector)">preMultiply</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/linear/AbstractRealMatrix.html" title="class in org.apache.commons.math3.linear">AbstractRealMatrix</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - the row vector to premultiply by</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>v * this</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</a></code> - if the dimension of <code>v</code> does not
 match the row dimension of <code>this</code>.</dd></dl>
</li>
</ul>
<a name="inverse()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>inverse</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html" title="class in org.apache.commons.math3.linear">DiagonalMatrix</a>&nbsp;inverse()
                       throws <a href="../../../../../org/apache/commons/math3/linear/SingularMatrixException.html" title="class in org.apache.commons.math3.linear">SingularMatrixException</a></pre>
<div class="block">Computes the inverse of this diagonal matrix.
 <p>
 Note: this method will use a singularity threshold of 0,
 use <a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html#inverse(double)"><code>inverse(double)</code></a> if a different threshold is needed.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the inverse of <code>m</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/SingularMatrixException.html" title="class in org.apache.commons.math3.linear">SingularMatrixException</a></code> - if the matrix is singular</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.3</dd></dl>
</li>
</ul>
<a name="inverse(double)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>inverse</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/commons/math3/linear/DiagonalMatrix.html" title="class in org.apache.commons.math3.linear">DiagonalMatrix</a>&nbsp;inverse(double&nbsp;threshold)
                       throws <a href="../../../../../org/apache/commons/math3/linear/SingularMatrixException.html" title="class in org.apache.commons.math3.linear">SingularMatrixException</a></pre>
<div class="block">Computes the inverse of this diagonal matrix.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>threshold</code> - Singularity threshold.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the inverse of <code>m</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/linear/SingularMatrixException.html" title="class in org.apache.commons.math3.linear">SingularMatrixException</a></code> - if the matrix is singular</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.3</dd></dl>
</li>
</ul>
<a name="isSingular(double)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isSingular</h4>
<pre>public&nbsp;boolean&nbsp;isSingular(double&nbsp;threshold)</pre>
<div class="block">Returns whether this diagonal matrix is singular, i.e. any diagonal entry
 is equal to <code>0</code> within the given threshold.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>threshold</code> - Singularity threshold.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if the matrix is singular, <code>false</code> otherwise</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.3</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DiagonalMatrix.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/math3/linear/DefaultRealMatrixPreservingVisitor.html" title="class in org.apache.commons.math3.linear"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/math3/linear/EigenDecomposition.html" title="class in org.apache.commons.math3.linear"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/math3/linear/DiagonalMatrix.html" target="_top">Frames</a></li>
<li><a href="DiagonalMatrix.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2003&#x2013;2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>
